﻿@using Mulala.Cavan.Presentation.Mvc.Controller
@model Mulala.Cavan.Presentation.Mvc.ViewModel.ICorporationViewModel
@{
    ViewBag.Title = "个人中心";
    Layout = "~/Views/Shared/_CorporationCenterLayout.cshtml";
}
@section header{
    <title>@ViewBag.Title</title>
    @Styles.Render("~/Content/themes/corporationcenter")
    @Styles.Render("~/Content/themes/corporationcenter/index")   
}
<div id="main">
    <div id="maintoptext">
        &nbsp;&nbsp;欢迎，@Model.Item.FullName！<br />
        <span style="padding-left: 30px;">你已经传 @Model.NannyCount 个家政人员，竞标 @Model.BiddingConsignCount
            个委托，总共有点 @Model.BiddingSuccessConsignCount 个竞标成功</span>
        <input type="submit" name="button" id="button" value="刷  新" />
        <span style="padding-left: 35px;">客服QQ：258190958</span>
    </div>
    @Html.Partial("_corporationToolPartial")
    <div id="divtab">
        <div id="divtop1">
            &nbsp;&nbsp;&nbsp;&nbsp;最新竞标</div>
        @{
            Html.RenderAction(ActionConst.CORPORATIONRECENTBIDDINGCONSIGN, ControllerConst.CONSIGN);
        }
        <div id="divtop2">
            &nbsp;&nbsp;&nbsp;&nbsp;谁看过我</div>
        @{
            Html.RenderAction(ActionConst.RECENTVISITOR, ControllerConst.VISITHISTORY, new { id = @Model.MasterModel.CurrentUserModel.UserAccountID });
        }
    </div>
    <div id="divsystem">
        &nbsp;&nbsp;&nbsp;&nbsp;系统公告</div>
    @{
        Html.RenderAction(ActionConst.RECENTNOTICE, ControllerConst.NOTICE);
    }
</div>
<div id="rights">
    <div id="righttop1">
        @Html.Partial("_corporationAccessPartial", @Model)
    </div>
    <div id="divs1">
        @{
            Html.RenderAction(ActionConst.RECOMMENDCONSIGN, ControllerConst.CONSIGN);
        }
    </div>
    <div id="divs2">
        @{
            Html.RenderAction(ActionConst.POPULARPROPRIETOR, ControllerConst.PROPRIETOR);
        }
    </div>
    <div id="righttop2" class="rightbomt" style="margin-top: 10px;">
        @{
            @Html.Partial("_corporationCenterHelpPartial");
        }
    </div>
</div>
@section scripts{
    @Scripts.Render("~/bundles/corporationcenter/index")
    <script type="text/javascript">
        $(function () {
            $("#refresh").click(function () {
                $.ajax({
                    url: '/corporationcenter/refresh',
                    type: 'POST',
                    success: function (data) {
                        if (data) {
                            if (data.IsSuccess) {
                                alert(data.Messages[0]);
                            }
                        }
                    },
                    error: function () {
                    }
                });
            });
        })
    </script>
}
